package com.example.demo;

import org.docx4j.fonts.PhysicalFonts;

/**
 * word 字体检测
 */
public class FontCheck {


    public static void main(String [] args) throws Exception {

        PhysicalFonts.discoverPhysicalFonts();
        PhysicalFonts.getPhysicalFonts().forEach((key,value)->{
            System.out.println("fontKey is "+key);
        });
        System.out.println(PhysicalFonts.get("microsoft sans serif"));
    }
}
